-- GENERATED SPELL FOR [Witherbark Speaker] --


function spell0_11388(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(22885,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11388', 2253, 1)
end

function spell1_11388(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(21401,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11388', 8258, 1)
end

function spell2_11388(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(15982,pUnit)
pUnit:RegisterEvent('Sorts_11388', 3000, 1)
end

function spell3_11388(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(15801,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11388', 3000, 1)
end

function spell4_11388(pUnit, Event) --@Superior Healing Ward,Self--
pUnit:FullCastSpellOnTarget(15869,pUnit)
pUnit:RegisterEvent('Sorts_11388', 32000, 1)
end

function Sorts_11388(pUnit, Event)
local choix_sorts_11388 = math.random(0, 4)
if choix_sorts_11388 == 0 then
pUnit:RegisterEvent('spell0_11388', 1, 1)
end
if choix_sorts_11388 == 1 then
pUnit:RegisterEvent('spell1_11388', 1, 1)
end
if choix_sorts_11388 == 2 then
pUnit:RegisterEvent('spell2_11388', 1, 1)
end
if choix_sorts_11388 == 3 then
pUnit:RegisterEvent('spell3_11388', 1, 1)
end
if choix_sorts_11388 == 4 then
pUnit:RegisterEvent('spell4_11388', 1, 1)
end
end

function mob11388_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11388', math.random(1500, 3000), 1)
end

function mob11388_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11388_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11388_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11388, 1, 'mob11388_Action')
RegisterUnitEvent(11388, 2, 'mob11388_Leave')
RegisterUnitEvent(11388, 3, 'mob11388_Kill')
RegisterUnitEvent(11388, 4, 'mob11388_Die')
